<%@ page import="java.sql.*, javax.sql.*, javax.naming.*" %>
<%@page import="support.*, java.util.*" %>  
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>View Analytics</title>
</head>
<body>
    <%
    // get choice
    String choice = (String)request.getSession(false).getAttribute("choice");
    ResultSet rset = (ResultSet)request.getSession(false).getAttribute("analyticsRowSet");
    
    out.print("<table border=1>");
    while(rset.next()){ %>
        <tr>
        <!-- Name of Specialization -->
        <td>
          <%
             out.print(rset.getString(1) + "<br>");
          %>
        </td>
        <!--  Number of students taking the class -->
        <td>
            <% out.print("<a href=\"/Application_Submission/admin/viewAnalytics.do?category=" + rset.getString(1) + "\">"); %>
            <% out.print(rset.getInt(2) + "</a>"); %>
        </td>
        </tr>
  <% } out.print("</table>"); %>
</body>
</html>